https://joshstrange.com/ubuntu-formatting-a-3tb-drive/
1. To find the drive name (will be something like ‘/dev/sdX' – where X is a letter like ‘a' or ‘b')
$ lsblk2. to use the ‘parted' command:
$ sudo parted /dev/sdXIn the parted interactive console type (change 3.00TB to the size of your drive):
(parted) mklabel gpt
(parted) unit TB
(parted) mkpart primary 0.00TB 3.00TB
(parted) quitThen (Where X is the same as above and note the “1” added now):
$ sudo mkfs.ext4 /dev/sdX1By default 5% is reserved for the root to stop the driving becoming unusable when full. For data and drives not used as the main OS this does not matter too much and can be reduced. 5% of 3TB is 150 GB which is unnecessary. Turn this down to 1% and note the ‘X' and ‘1' just like the above command:
$ sudo tune2fs -m 1 /dev/sdX1To make a directory to mount the drive to if you don't have one already:
$ mkdir /Your/Mount/Point/HereTo get the UUID of your drive:
$ sudo blkid (Copy the UUID of your drive)You will see a list of devices with each looking something like:
/dev/sdb1: UUID="9d0a468b-4f97-4622-8707-177dbc5c5084" TYPE="ext4" PARTLABEL="primary" PARTUUID="944dd063-c154-461b-9fce-46d25e5575cb"Copy the UUID which will be the part that looks like:
UUID="9d0a468b-4f97-4622-8707-177dbc5c5084"Then we edit the file below:
$ sudo nano /etc/fstabAdd the UUID that you copied above to the end of the file and also delete the parenthesis surrounding the UUID:
UUID=YOUR-UUID-HERE-XXXX    /Your/Mount/Point/Here  ext4    defaults    1   2 example:
UUID=9d0a468b-4f97-4622-8707-177dbc5c5084 /media/mynewdrive ext4 defaults 1 2Ctrl-X, the ‘Y' to save and exit
Finally to mount the drive:
$ sudo mount -aYour drive will be partitioned, formatted as ext4, and mounted.